package com.sunwayworld.basemodule.common.eptstorage.db.resource.impl;

import com.sunwayworld.basemodule.common.eptstorage.db.resource.LimsDbextractResource;
import com.sunwayworld.basemodule.common.eptstorage.db.service.LimsDbextractService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@LogModule("DB数据源抽取规则")
@RestController
@GikamBean
public class LimsDbextractResourceImpl implements LimsDbextractResource {

    @Autowired
    private LimsDbextractService limsDbextractService;

    @Override
    public LimsDbextractService getService() {
        return limsDbextractService;
    }

    @Log(value = "新增DB数据源抽取规则", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

}
